package com.ruoyi.system.domain.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.page.PageQuery;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author wux
 * @date 2023/5/22 10:52
 */
@Data
@ApiModel(value = "客户端账号")
public class SysUserDTO extends PageQuery {
    @ApiModelProperty(value = "用户ID")
    private Long id;

    @ApiModelProperty(name = "项目id")
    @NotNull
    private Long projectId;

    @ApiModelProperty(name = "用户名称")
    @NotBlank
    private String name;

    @ApiModelProperty(name = "手机号码")
    @NotBlank
    private String phone;

    @ApiModelProperty(value = "帐号状态（0正常 1停用）")
    private Integer status;

    @ApiModelProperty(name = "密码")
    @NotBlank
    private String password;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "角色列表")
    @NotEmpty
    private List<Long> roleList;

    @Data
    public static class SysUserUpdate {
        @ApiModelProperty(value = "用户ID")
        @NotNull
        private Long id;

        @ApiModelProperty(name = "用户名称")
        @NotBlank
        private String name;

        @ApiModelProperty(name = "手机号码")
        @NotBlank
        private String phone;

        @ApiModelProperty(value = "帐号状态（0正常 1停用）")
        @NotNull
        private Integer status;

        @ApiModelProperty(value = "角色列表")
        @NotEmpty
        private List<Long> roleList;
    }
}
